$('.addattr').click(function () {
    var dIv=$("<div class='b-div'>" +
        "<h4 class='b-h4'>提示</h4>" +
        "<input type='text' class='addattrval' placeholder='属性名'> <input class='addvalattrval' type='text' placeholder='属性值'>" +
        "<div class='b-btn'>" +
        "<input type='button' onclick='addattr()' value='确认' class='b-confirm btn-primary'>" +
        "<input type='button' value='取消' class='b-cancel'>" +
        "</div>" +
        "</div>");
    $("body").append(dIv);
})



function addattr() {
    var addattrval = $('.addattrval').val();
    var addvalattrval = $('.addvalattrval').val();
    var attrhtml = '<div class="attrlist">\n' +
        '    <div class="oneatrlist">' +
        '    <span>'+addattrval+'</span>\n' +
        '    <span>'+addvalattrval+'</span>\n' +
        '    </div>' +
        '    <input type="button" class="insertattr" value="+">\n' +
        '    </div>'
    $(".b-div").hide();
    $('.lists').append(attrhtml);
}


$("body").on("click", ".insertattr", function() {
    var thiss = $(this).prev();
    var insertattrhtml = $("<div class='a-div'>" +
        "<h4 class='b-h4'>提示</h4>" +
        "<input class='insertvalattrval' type='text' placeholder='属性值'>" +
        "<div class='b-btn'>" +
        '<input type="button" onclick="insertattrval('+thiss+')" value="确认" class="b-confirm btn-primary">' +
        "<input type='button' value='取消' class='b-cancel'>" +
        "</div>" +
        "</div>");
    $("body").append(insertattrhtml);
});



function insertattrval(aa) {

}